package com.ridbor001.demo.bean;

public class RDBUser {
    protected String name;
    protected String password;
    protected String gender;
    protected int age;
    protected String phone;

    public RDBUser(String name, String password,
                   String gender, int age, String phone) {
        this.name = name;
        this.password = password;
        this.gender = gender;
        this.age = age;
        this.phone = phone;
    }

    // 角色标识方法
    public boolean isStudent() {
            return this instanceof RDBStudent;
    }
    public boolean isTeacher() {
            return this instanceof RDBTeacher;
    }
    public boolean isAdmin() {return this instanceof RDBAdmin;}


    public RDBUser(){}

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}